<!--{if $page_info.page_count gt 1}-->
<div class="page">
    <div class="items">
        <!--{if $page_info.prev_link}-->
        <a href="{$page_info.prev_link}" class="item prev"><i><</i><em>{$lang.prev_page}</em></a>
        <!--{else}-->
        <a href="javascript:void(0)" class="item prev prev-disabled"><i><</i><em>{$lang.prev_page}</em></a>
        <!--{/if}-->
        <!--{if $page_info.first_link}-->
        <a class="item" href="{$page_info.first_link}">1</a>
        <a href="javascript:void(0)" class="item dot">...</a>
        <!--{/if}-->
        <!--{foreach from=$page_info.page_links key=page item=link}-->
        <!--{if $page_info.curr_page eq $page}-->
        <a class="item active" href="javascript:void(0)" >{$page}</a>
        <!--{else}-->
        <a class="item" href="{$link}" >{$page}</a>
        <!--{/if}-->
        <!--{/foreach}-->
        <!--{if $page_info.last_link}-->
        <a href="javascript:void(0)" class="item dot">...</a>
        <a class="item" href="{$page_info.last_link}"><!--{$page_info.page_count}--></a>
        <!--{/if}-->
        <!--{if $page_info.next_link}-->
        <a href="{$page_info.next_link}" class="item next"><em>{$lang.next_page}</em><i>></i></a>
        <!--{else}-->
        <a href="javascript:void(0)" class="item next next-disabled"><em>{$lang.next_page}</em><i>></i></a>
        <!--{/if}-->
    </div>
    <div class="total">
        {$lang.gong}{$page_info.page_count}{$lang.page}
    </div>
	
    <div class="form">
        <span class="pagetext">{$lang.page_to}</span>
        <input class="pageinput" type="number" value="{$page_info.curr_page}" id="page_number" min="1" max="{$page_info.page_count}" aria-label="{$lang.page_input}">
        <span class="pagetext">{$lang.page}</span>
        <span class="pagebtn" role="button" tabindex="0" onclick="page_go()">{$lang.confirm}</span>
    </div>
</div>
<script>
    function page_go() {
        var number = $("#page_number").val();
        var params = location.search.substr(1).split('&');
        var found = false;
        for (var i = 0; i < params.length; i++)
        {
            param = params[i];
            arr = param.split('=');
            pKey = arr[0];
            if (pKey == 'page')
            {
                params[i] = 'page='+number;
                found = true;
            }
        }
        if (!found)
        {
            number = transform_char(number);
            params.push( 'page=' + number);
        }
        location.assign(SITE_URL + '/index.php?' + params.join('&'));
    }
</script>
<!--{/if}-->
